<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<html>
	<head>
		<title>功能管理</title>

		<script>
	$(document).ready(function() {
		//聚焦第一个输入框
		$("#ordenoSource_name").focus();
		//为inputForm注册validate函数
		$("#inputForm").validate();
	});


</script>
	</head>

	<body>
<section class="content">
<div class="row">
		<div class="col-md-12">

			<!-- Primary box -->
			<div class="box box-solid box-primary">
				<div class="box-header">
					<i class="fa fa-edit"></i>
					<h3 class="box-title">订单来源平台管理</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">	
		<form id="inputForm" action="${ctx}/ordenoSource/${action}"
			method="post" class="form-horizontal">
			<input type="hidden" name="id" value="${ordenoSource.id}" />
			<fieldset>
				<c:if test="${status eq '1' }">
					<div class="form-group">
						<label for="ordenoSourceCode" class="col-sm-3 control-label">
							平台:
						</label>
						<div class="col-sm-6">
							<select id="ordenoSourceCode" name="ordenoSourceCode"
								onchange="sourceChange(this.value)" class="form-control">

								<option value="jd--京东"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'jd'}">selected="selected"</c:if>>
									京东
								</option>
								<option value="ocr--订单导入"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'ocr'}">selected="selected"</c:if>>
									订单导入
								</option>
								<option value="ht--禾塘"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'ht'}">selected="selected"</c:if>>
									禾塘
								</option>
                                <option value="wdgj--网店管家"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'ht'}">selected="selected"</c:if>>
									网店管家
								</option>
								<option value="mls--美丽说"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'mls'}">selected="selected"</c:if>>
									美丽说
								</option>
								
								<option value="yhd--一号店"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'yhd'}">selected="selected"</c:if>>
									一号店
								</option>
								<option value="fr--富润"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'yhd'}">selected="selected"</c:if>>
									富润
								</option>
                                <option value="oms--派友OMS"
									<c:if test="${ordenoSource.ordenoSourceCode eq 'OMS'}">selected="selected"</c:if>>
									能容OMS
								</option>
							</select>
							</div>
					</div>
				</c:if>

				
					<div class="form-group">
					<label for="present" class="col-sm-3 control-label">
						简介:
					</label>
					<div class="col-sm-6">
						<textarea rows="10" id="present" name="present"
							value="${ordenoSource.present}" class="form-control input-large required"
							minlength="2"></textarea>
					</div>
				</div>
				
				<div class="modal-footer bg-gray">
					<input id="submit_btn" class="btn btn-primary" type="submit"
						value="提交" />
					<input id="cancel_btn" class="btn" type="button" value="返回"
						onclick="history.back()" />
				</div>
				<script type="text/javascript">
	             $("#present").val("${ordenoSource.present}");
	            
	             var value = $("#ordenoSourceCode").val();
	             function init(){
	               if(!value){
	                 value='${ordenoSource.ordenoSourceCode}';
	               }
	             }
	             init();
	             sourceChange(value);
                </script>
			</fieldset>
		</form>
		</div>
		</div>
		</div>
		</div>
		</section>
		
	</body>
</html>
